<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<h:head>
</h:head>
<h:body>
	<h:form prependId="false">
		<p:commandButton id="btnRefreshBudgetOverviewChart"
			value="Refresh budgets"
			action="#{budgetBean.refreshBudgetOverviewChart()}"
			update="budget_chart" render="false" />

		<p:pieChart id="budget_chart"
			value="#{budgetBean.budget_overview_model}" legendPosition="e"
			showDataLabels="true" title="Budget Overview" sliceMargin="10"
			style="width:400px;height:300px">

			<p:ajax event="itemSelect"
				listener="#{budgetBean.refreshBudgetDetailsChart}"
				/>
		</p:pieChart>
	</h:form>
</h:body>
</html>